//
//  FollowViewController.m
//  ZhiHuiLiJiang
//
//  Created by Work on 2018/11/18.
//  Copyright © 2018年 王雅鹏. All rights reserved.
//我的关注VC--已废弃

#import "FollowViewController.h"
#import "NavigationView.h"
#import "FollowViewOneTypeCell.h"

@interface FollowViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic ,strong) UITableView * mainTableView;

@end
@implementation FollowViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    if (!self.tabBarController.tabBar.isHidden) {
        self.tabBarController.tabBar.hidden = YES;
    }
}
- (void)setupUI{
    self.view.backgroundColor = [UIColor whiteColor];
    BY_kWeakSelf(ws);
    [self setTitleStr:@"我的关注" leftAction:^{
        [ws.navigationController popViewControllerAnimated:YES];
    }];
    //tableView
    _mainTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, BY_Nav_H, BY_ScreenWidth, BY_ScreenHeight-BY_NavBot_H) style:UITableViewStylePlain];
    _mainTableView.delegate = self;
    _mainTableView.dataSource = self;
    _mainTableView.rowHeight = BY_Width(164) + BY_Height(20*2);
    _mainTableView.backgroundColor = [UIColor whiteColor];
    _mainTableView.tableFooterView = [UIView new];
    _mainTableView.sectionFooterHeight = 0.01;
    _mainTableView.sectionHeaderHeight = BY_Height(24)+BY_Height(30);
    [_mainTableView registerClass:[FollowViewOneTypeCell class] forCellReuseIdentifier:@"FollowViewOneTypeCell"];
    [self.view addSubview:_mainTableView];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    NSLog(@"内存警告");
}

#pragma mark- tableView代理
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 6;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    FollowViewOneTypeCell  *cell = [tableView dequeueReusableCellWithIdentifier:@"FollowViewOneTypeCell" forIndexPath:indexPath];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
//    cell.backgroundColor = BYRandomColor;
    cell.heardImageView.image = [UIImage imageNamed:@"hotDiscussion_1"];
    cell.tagLabel.text = @"景点";
    cell.titleLabel.text = @"丽江古城";
    cell.redTagLabel.text = @"5A";
    cell.redTagrightLabel.text = @"世界文化遗产 | 必游Top4";
    cell.contentLabel.text = @"景点景点景点景点景点景点景点世界文化遗产 | 必游Top4世界文化遗产 | 必游Top4世界文化遗产 | 必游Top4世界文化遗产 | 必游Top4世界文化遗产 | 必游Top4";
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    NSLog(@"点击了我的关注的cell");

}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    UIView *headView = [[UIView alloc]init];
    headView.backgroundColor = [UIColor whiteColor];
    UILabel *timeLab = [BYVS createLabText:@"" font:BYPTFont28 labColor:BYColor10 addSubView:headView];
    [timeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(headView.mas_bottom);
        make.left.equalTo(headView.mas_left).offset(BY_Width(24));
    }];
    timeLab.text = @"2108-11-22";
    
    return headView;
}


@end
